<script setup name="ToolSwaggerIndex">
const router = useRouter();

const data = ref({
  src: import.meta.env.VITE_APP_API_BASEURL + "/swagger-ui/index.html",
  height: document.documentElement.clientHeight - 120 + "px;",
  loading: true
});

// 页面挂载时 调用
onMounted(() => {
  setTimeout(() => {
    this.loading = false;
  }, 230);
  const that = this;
  window.onresize = function temp() {
    that.height = document.documentElement.clientHeight - 94.5 + "px;";
  };
});
//
</script>

<template>
  <div :style="'height:' + data.height">
    <page-main style="height: calc(100vh - 160px); margin: 10px">
      <iframe
        :src="data.src"
        frameborder="no"
        style="width: 100%; height: 100%"
        scrolling="auto"
      ></iframe>
    </page-main>
  </div>
</template>
